-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copier: retain symlink target w/ follow-link #4703
base: main
Are you sure you want to change the base?
Conversation
Tests are a bit unhappy. I always twitch when I see anything to do with symlinks. I can't point a finger at anything wrong with this, but I'm not sure if it's a good idea to do the copy of the symlink. |
You're right, but unfortunately, that's how docker does things right now. They cp the symlink as it is irrespective of whether the target is present or not. I'll try to look for what's the rationale behind this but otherwise, this should be harmless with a global bool @rhatdan suggested. Wdyt? |
If the cp is supposed to be into the container image, then we need to make sure the symbolic link still points within the image. IE Make sure it does not point at the hosts /etc/passwd. Similarly if you are copying from the container to the host, we should make sure the source is within the container image. |
Are you suggesting we move the target to the container and then create a symbolic link? That'd be quite surprising in terms of user experience, wouldn't it? And besides, it'll be diverting quite far from how docker does things.
With this change, it would point to the host's |
Ok this LGTM, now we need to fix tests. |
A friendly reminder that this PR had no activity for 30 days. |
7290112
to
b58a762
Compare
Planning to add a test for this over at containers/podman#18020 utilizing the |
A friendly reminder that this PR had no activity for 30 days. |
LGTM |
Without a unit test, I'm very reluctant to change things in Without changing the |
A friendly reminder that this PR had no activity for 30 days. |
@danishprakash any progress with the test? |
b58a762
to
c0e32d7
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: danishprakash The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c0e32d7
to
94e3b6b
Compare
From what I know, the problem isn't with symlinks but with how we deal with the target when not following links. So If I understand the issue, this is what's happening: During the copy from the host, But the behavior we need is to allow podman to follow or not follow links based on a flag that is propagated from Podman to Buildah via |
94e3b6b
to
cb54c0c
Compare
cb54c0c
to
d396193
Compare
* add unit test [NO NEW TESTS NEEDED] Signed-off-by: danishprakash <[email protected]>
d396193
to
467aca4
Compare
A friendly reminder that this PR had no activity for 30 days. |
@nalind PTAL |
A friendly reminder that this PR had no activity for 30 days. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds support for not following link with
podman cp
by default in order to conform to docker's behavior.How to verify it
Which issue(s) this PR fixes:
This PR is in conjunction with containers/podman#18020 which closes containers/podman#16585